Applying consistent log levels to application log messages

ABSTRACT

A method is provided for analyzing log message content. The computer-implemented method may include detecting, by at least one processor, log messages in an application code, identifying a log level assigned to each of the log messages, and performing natural language processing (NLP) analysis on each of the log messages by using at least keyword and synonym matching percentage analysis criteria. The computer-implemented method may further include determining, in response to the NLP analysis, a severity score of each of the log messages, and reclassifying, based on the severity score, the assigned log level of one or more of the log messages to a different log level.

BACKGROUND Technical Field

The present invention relates generally to computing systems, and morespecifically, to analyzing log message content and reclassifying the loglevel or severity of the log message based on natural languageprocessing (NLP) analysis.

Description of the Related Art

In order to provide support services for computing systems, one wouldrequire a trace record of all of the activities which have occurred at anode or machine. For personal computers operating in standalone fashion,such tracking or recording of actions may be realistic. Some computercode does provide for the continual logging and tracing of allactivities, typically using a log component, as well as a tracer. Shouldan error occur and an error message be generated, then there exists acomplete record of activities which may be pulled up by a debug programand may be reviewed to determine the source of the problem. If such alogging and/or tracing record exists, it eliminates the need for acustomer to recreate the issue, a process which is unpredictable andtime-consuming. The log record provides both a time frame and a task orentity identification of the source of the error.

SUMMARY

In accordance with an embodiment of the present principles, acomputer-implemented method is provided for analyzing log messagecontent. The computer-implemented method includes the step of detecting,by the at least one processor, log messages in an application code. Thecomputer-implemented method further includes the steps of identifying alog level assigned to each of the log messages and performing naturallanguage processing (NLP) analysis on each of the log messages by usingat least keyword and synonym matching percentage analysis criteria. Thecomputer-implemented method further includes the steps of determining,in response to the NLP analysis, a severity score of each of the logmessages and reclassifying, based on the severity score, the assignedlog level of one or more of the log messages to a different log level.

In accordance with another embodiment of the present principles, asystem for analyzing log message content is provided. The systemincludes a memory and a processor in communication with the memory,wherein the processor is configured to detect log messages in anapplication code, identify a log level assigned to each of the logmessages, perform natural language processing (NLP) analysis on each ofthe log messages by using at least keyword and synonym matchingpercentage analysis criteria, determine, in response to the NLPanalysis, a severity score of each of the log messages, and reclassify,based on the severity score, the assigned log level of one or more ofthe log messages to a different log level.

It should be noted that the exemplary embodiments are described withreference to different subject-matters. In particular, some embodimentsare described with reference to method type claims whereas otherembodiments have been described with reference to apparatus type claims.However, a person skilled in the art will gather from the above and thefollowing description that, unless otherwise notified, in addition toany combination of features belonging to one type of subject-matter,also any combination between features relating to differentsubject-matters, in particular, between features of the method typeclaims, and features of the apparatus type claims, is considered as tobe disclosed within this document.

These and other features and advantages will become apparent from thefollowing detailed description of illustrative embodiments thereof,which is to be read in connection with the accompanying drawings.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The disclosure will provide details in the following description ofpreferred embodiments with reference to the following figures wherein:

FIG. 1 is a block/flow diagram of an exemplary computing system foranalyzing log message content, in accordance with an embodiment of thepresent principles;

FIG. 2 is a block/flow diagram of an exemplary method for reclassifyinglog messages of application code of a single user, in accordance with anembodiment of the present principles;

FIG. 3 is a block/flow diagram of an exemplary method for reclassifyinglog messages of application code of multiple users, the log messagesincluding the same words or phrases, in accordance with an embodiment ofthe present principles;

FIG. 4 is a block/flow diagram of an exemplary method for reclassifyinglog messages of application code of multiple users, the log messagesincluding similar words or phrases, in accordance with an embodiment ofthe present principles;

FIG. 5 is a block/flow diagram of an exemplary method for reclassifyinglog messages of application code of multiple users, the log messagesanalyzed by sentiment analysis, in accordance with an embodiment of thepresent principles;

FIG. 6 is a sample table assigning severity scores to common words foundin log messages of application code, in accordance with an embodiment ofthe present principles;

FIG. 7 is a sample table assigning sentiments to common words found inlog messages of application code, in accordance with an embodiment ofthe present principles;

FIG. 8 is an example log message found in application code having an“INFO” log level designation, the log message analyzed in accordancewith the tables of FIGS. 6 and 7, where the “INFO” designation has beenreclassified, in accordance with an embodiment of the presentprinciples;

FIG. 9 is an example log message found in application code having a“WARN” log level designation, the log message analyzed in accordancewith the tables of FIGS. 6 and 7, where the “WARN” designation has beenreclassified, in accordance with an embodiment of the presentprinciples;

FIG. 10 is an example log message found in application code having a“WARN” log level designation, the log message analyzed in accordancewith the tables of FIGS. 6 and 7, where the “WARN” designation has beenmaintained, in accordance with an embodiment of the present principles;and

FIG. 11 is a block/flow diagram of an exemplary method for analyzing logmessage content by using NLP analysis tools to reclassify log levelsassigned to log messages, in accordance with an embodiment of thepresent principles.

Throughout the drawings, same or similar reference numerals representthe same or similar elements.

DETAILED DESCRIPTION

The present principles are directed to systems and methods for analyzinglog message content. In some embodiments, the present principles providesystems, methods and computer program products to perform staticanalysis of logging or log statements/messages in conjunction withprogramming models to determine the relative importance of each logmessage and the appropriate log level to assign to each message.Messages are analyzed for both content and context so that messages ofsimilar importance are logged at the same level.

The systems and methods provide for consistent log levels across anapplication code despite differing individual coding styles across ateam. Additionally, there is no need for manual intervention in settinglog levels. The log levels are automatically reclassified or reset bylog level reclassification software that applies natural languageprocessing (NLP) analysis. The NLP analysis may include syntax analysis,semantics analysis, contextual analysis, and/or sentiment analysis. Oneor more of these analyses may be applied to log messages of anapplication code. The syntax analysis, the semantics analysis, and thecontextual analysis may involve the computation of a score, such as aseverity score or log level score, that may be used in combination witha sentiment value to make a decision as to whether a log level should bereclassified or readjusted to a more accurate or consistent log level.

The systems and methods further provide for detecting, by the at leastone processor, log messages in an application code, identifying a loglevel assigned to each of the log messages, performing NLP analysis oneach of the log messages by using at least keyword and synonym matchingpercentage analysis criteria, determining, in response to the NLPanalysis, a severity score of each of the log messages, andreclassifying, based on the severity score, the assigned log level ofone or more of the log messages to a different log level. The NLPincludes analyzing trigger words to sort log messages, syntax or grammaranalysis, semantics analysis, and sentiment analysis. Additionally, theNLP performs content analysis of the log message itself to modify orchange or readjust or reclassify log levels assigned by a user, e.g.,such a programmer or coder.

Referring now to the drawings in which like numerals represent the sameor similar elements and initially to FIG. 1, a block/flow diagram of anexemplary computing system for analyzing log message content ispresented, in accordance with an embodiment of the present principles.

An exemplary log message content processing system 100 to which thepresent principles may be applied is shown in accordance with oneembodiment. The log message content processing system 100 includes atleast one processor (CPU) 104 operatively coupled to other componentsvia a system bus 102. A cache 106, a Read Only Memory (ROM) 108, aRandom Access Memory (RAM) 110, an input/output (I/O) adapter 120, asound adapter 130, a user interface adapter 150, and a display adapter160, are operatively coupled to the system bus 102.

A first storage device 122 and a second storage device 124 areoperatively coupled to system bus 102 by the I/O adapter 120. Thestorage devices 122 and 124 can be any of a disk storage device (e.g., amagnetic or optical disk storage device), a solid state magnetic device,and so forth. The storage devices 122 and 124 can be the same type ofstorage device or different types of storage devices. The I/O adapter120 further communicates with a log message detection device 170, a loglevel detection device 172, an NLP analysis tool 174, and a log leveladjustment or reclassification device 176 for analyzing content of logmessages. The log message detection device 170, the log level detectiondevice 172, the NLP analysis tool 174, and the log level adjustment orreclassification device 176 may be associated with the storage device122. Such devices 170, 172, 174, 176 need not be incorporated within thestorage device 122. Such devices 170, 172, 174, 176 may be external tothe storage device 122. One skilled in the art may contemplate differentsystem and networking configurations for incorporating the devices 170,172, 174, 176 therein.

A speaker 132 is operatively coupled to system bus 102 by the soundadapter 130. A display device 162 is operatively coupled to system bus102 by display adapter 160.

A first user input device 152, a second user input device 154, and athird user input device 156 are operatively coupled to system bus 102 byuser interface adapter 150. The user input devices 152, 154, and 156 canbe any of a keyboard, a mouse, a keypad, an image capture device, amotion sensing device, a microphone, a device incorporating thefunctionality of at least two of the preceding devices, and so forth. Ofcourse, other types of input devices can also be used, while maintainingthe spirit of the present principles. The user input devices 152, 154,and 156 may be the same type of user input device or different types ofuser input devices. The user input devices 152, 154, and 156 are used toinput and output information to and from the log message contentprocessing system 100.

Of course, the log message content processing system 100 may alsoinclude other elements (not shown), as readily contemplated by one ofskill in the art, as well as omit certain elements. For example, variousother input devices and/or output devices may be included in the logmessage content processing system 100, depending upon the particularimplementation of the same, as readily understood by one of ordinaryskill in the art. For example, various types of wireless and/or wiredinput and/or output devices can be used. Moreover, additionalprocessors, controllers, memories, and so forth, in variousconfigurations can also be utilized as readily appreciated by one ofordinary skill in the art. These and other variations of the log messagecontent processing system 100 are readily contemplated by one ofordinary skill in the art given the teachings of the present principlesprovided herein.

FIG. 2 is a block/flow diagram of an exemplary method for reclassifyinglog messages of application code of a single user, in accordance with anembodiment of the present principles.

The system 200 includes a user 202, such as, e.g., a coder, aprogrammer, a developer, or a software engineer, for writing anapplication code 210. Application code 210 is code written specificallyfor an application created in a language, such as Java™ The applicationcode 210 may include a plurality of log messages 211, 212, 213, 214,215, 216 created or written by the user 202. A log message, in general,is a text string with an abundance of contextual information. Some ofthat information is passed to the logging calls through direct ordefault mechanisms with the rest being obtained from the operatingsystem (OS) as part of the process of generating the log message atlarge.

In computing, a logfile is a file that records either events that occurin an OS or other software runs, or messages between different users ofcommunication software. Logging is the act of keeping a log. In thesimplest case, messages are written to a single logfile.

In one example, the user 202 may have created, e.g., six (6) logmessages 211, 212, 213, 214, 215, 216 during the writing of theapplication code 210. The user 202 assigns a log level to each of thelog messages. A log level assignment component 220 enables the user 202to assign the “INFO” log level 221 to the first log message 211, the“INFO” log level 222 to the second log message 212, the “DEBUG” loglevel 223 to the third log message 213, the “TRACE” log level 224 to thefourth log message 214, the “DEBUG” log level 225 to the fifth logmessage 215, and the “WARN” log level 226 to the sixth log message 216.Therefore, each of the log messages created or written by the user 202are assigned a log level. Some of the most common log levels are“TRACE,” “DEBUG,” “INFO,” “WARN,” “ERROR,” and “FATAL.” One skilled inthe art may contemplate using a number of other log levels.

The log messages 211, 212, 213, 214, 215, 216 and their log levelassignments 221, 222, 223, 224, 225, 226 are received by the NLPanalysis tool 174. The NLP analysis tool 174 performs at least semanticanalysis 232, syntactic analysis 234, contextual analysis 236, andsentiment analysis 238.

NLP analysis tool 174 uses NLP, which is a field of computer science,artificial intelligence, and computational linguistics concerned withthe interactions between computers and human natural languages. As such,NLP is related to the area of human-computer interaction. Several modernNLP algorithms are based on machine learning, especially statisticalmachine learning, which make soft, probabilistic decisions based onattaching real-valued weights to each input feature. Such statisticalmodels have the advantage that they can express the relative certaintyof many different possible answers rather than only one, producing morereliable results when such a model is included as a component of alarger system. Moreover, this system could also be implemented withrules-based NLP algorithms or a mix of rules-based and machine-learningNLP algorithms.

NLP must ultimately extract meaning (i.e., “semantics”) from text bysemantic analysis 232. The text analysis includes formal grammars thatspecify relationships between text units, such as parts of speech, suchas nouns, verbs, and adjectives, and address syntax. One can extendgrammars to address natural-language semantics by greatly expandingsub-categorization, with additional rules/constraints.

Another task of NLP includes sentiment analysis 238, which is used toextract subjective information usually from a set of documents, such asapplication code, to determine “polarity” about specific log messages.It is useful for identifying trends of log messages in an applicationcode. Sentiment analysis 238 aims to determine the attitude of a speakeror a writer or coder with respect to some topic or the overallcontextual polarity of a document, e.g., an application code. Theattitude may be his or her judgment or evaluation, affective state(e.g., the emotional state of the coder when coding and writing logmessages), or the intended emotional communication (e.g., the emotionaleffect the coder wishes to have on the reader of the code). A basic taskin sentiment analysis 238 is classifying the polarity of a given text atthe document, code, sentence, or feature/aspect level, whether theexpressed opinion in a document, a code, a sentence or an entityfeature/aspect is positive, negative, or neutral.

Statistical and machine learning involve development (or use) ofalgorithms that allow a program to infer patterns about example(“training”) data, that in turn allows it to generalize, makepredictions about new data. During the learning phase, numericalparameters that characterize a given algorithm's underlying model arecomputed by optimizing a numerical measure, typically through aniterative process. In general, learning can be supervised, e.g., eachitem in the training data is labeled with the correct answer, orunsupervised, where it is not, and the learning process tries torecognize patterns automatically (as in cluster and factor analysis).

Another task of NLP includes “N-gram” analysis. An “N-gram” is asequence of N items, such as letters, words, or phonemes. Certain itempairs (or triplets, quadruplets, etc.) are likely to occur much morefrequently than others. For example, in English words, U always followsQ, and an initial T is never followed by K (though it may be in anotherlanguage). Given sufficient data, one may compute frequency-distributiondata for all N-grams occurring in that data. Because the permutationsincrease dramatically with N, for example, English has 26² possibleletter pairs, 26³ triplets, and so on, N is restricted to a modestnumber. N-grams are a kind of multi-order Markov model: the probabilityof a particular item at the Nth position depends on the previous N−1items, and can be computed from data. Once computed, N-gram data can beused for several purposes.

After the NLP analysis tool 174 analyzes the log messages 211, 212, 213,214, 215, 216 and their log level assignments 221, 222, 223, 224, 225,226 via the semantic analysis 232, syntactic analysis 234, contextualanalysis 236, and sentiment analysis 238, a severity score may becomputed for each of the log messages 211, 212, 213, 214, 215, 216 by ascore classification component 240. The first log message 211 has afirst score 241 (e.g., 80%), the second log message 212 has a secondscore 242 (e.g., 95%), the third log message 213 has a third score 243(e.g., 30%), the fourth log message 214 has a fourth score 244 (e.g.,60%), the fifth log message 215 has a fifth score 245 (e.g., 40%), andthe sixth log message 216 has a sixth score 246 (e.g., 99%). Thesescores 241, 242, 243, 244, 245, 246 are sent to the log levelreclassification or adjustment device 176.

The log level reclassification or adjustment device 176 determineswhether the log level assignments 221, 222, 223, 224, 225, 226 given tothe log messages 211, 212, 213, 214, 215, 216 by the user 202 areaccurate. In this example, the log level reclassification or adjustmentdevice 176 determined that the first log level assignment 221 providedby the user 202 is correct or accurate, as the first score 241 is at80%. Thus, the initial log level was not reassigned to another ordifferent log level. In other words, the log level “INFO” wasmaintained. Further, it was determined that the second log levelassignment 222, the fourth log level assignment 224, and the sixth loglevel assignment 226 provided by the user 202 are correct or accurate,as their respective scores 242, 244, and 246 indicate (e.g., 95%, 60%,99%, respectively). In other words, the initial log levels “INFO,”“TRACE,” and “WARN” were maintained for the second, fourth, and sixthlog messages 212, 214, 216, respectively.

In contrast, it was determined that the third log level assignment 223and the fifth log level assignment 225 should be reclassified orreadjusted to different log level designations. For example, the thirdlog level assignment 223 received a severity score 243 of 30% and thefifth log level assignment 225 received a severity score 245 of 40%.Thus, the NLP analysis tools 174 determined that the log levelassignments 223, 225 provided by the user 202 for the log messages 213,215, respectively, are not accurate or inconsistent with other similarlog level designations within the application code. The log levelreclassification device 176 automatically changed the third log levelassignment 223 of “DEBUG” to “INFO” log level 253 and changed the fifthlog level assignment 225 of “DEBUG” to “TRACE” log level 255.

Consequently, log levels assigned to log messages within a code may bechanged or modified or reclassified to a more accurate or correct orconsistent log level based on one or more analyses performed on the logmessages of the code itself. The system 200 of FIG. 2 uses severityscores or log level scores to make a reclassification decision. However,it is contemplated that sentiment values derived from the sentimentanalysis 238 may also be used in conjunction or in tandem with theseverity scores or log level scores to make a reclassification decision.Moreover, the content of the log messages 211, 212, 213, 214, 215, 216may be compared to content of log messages derived from otherapplication code written by others users/coders/developers. Thecomparison may reveal similarities and differences between content ofthe log messages of user 202 and content of the log messages of theother users. Such similarities and differences may be used as feedback,in combination with the sentiment values and the severity scores, toarrive at a reclassification decision for log levels of log messages211, 212, 213, 214, 215, 216.

FIG. 3 is a block/flow diagram of an exemplary method for reclassifyinglog messages of application code of multiple users, the log messagesincluding the same words or phrases, in accordance with an embodiment ofthe present principles.

The system 300 includes a plurality of users, e.g., a first user 302, asecond user 304, a third user 306, a fourth user 308, and a fifth user310. Each of the users 302, 304, 306, 308, 310 may be writing, e.g., aportion of an application code and including log messages therein. Forinstance, the first user 302 may write a log message 320 including thetext “unable to find X pattern.” The second user 304 may write a logmessage 322 also including the text “unable to find X pattern.” Thethird user 306 may write a log message 324 also including the text“unable to find X pattern.” The fourth user 308 may write a log message326 also including the text “unable to find X pattern.” The fifth user310 may write a log message 328 also including the text “unable to findX pattern.” Therefore, each of the five users 302, 304, 306, 308, 310wrote a log message 320, 322, 324, 326, 328, respectively, that wasexactly the same (i.e., included the same word or the same phrase).

The first user 302 assigned a “WARN” log level 330 to the log message320. The second user 304 assigned a “WARN” log level 332 to the logmessage 322. The third user 306 assigned an “INFO” log level 334 to thelog message 324. The fourth user 308 assigned a “WARN” log level 336 tothe log message 326. The fifth user 310 assigned a “WARN” log level 338to the log message 328. Therefore, four (4) users 302, 304, 308, 310assigned the same log level (i.e., “WARN”) to log messages having thesame word or text or phrase. In contrast, one (1) user 306 assigned adifferent log level (i.e., “INFO”) to that same log message having thesame text or word or phrase.

Such information may be fed to the log level adjustment orreclassification device 176 which either changes or maintains the loglevel assignments 330, 332, 334, 336, 338 made by the users 302, 304,306, 308, 310, respectively. In this example, the log level adjustmentor reclassification device 176 maintained the log level assignments 330,332, 336, 338 of the first, second, fourth, and fifth users 302, 304,308, 310, and reclassified or adjusted or changed the third log levelassignment 334 of the third user 306 to log level 344 designating thelog message 324 as “WARN” to be consistent with the log levelassignments used by the other users 302, 304, 308, 310.

Therefore, log levels across an application code written by multipleusers may be made consistent, even when taking into account thedifferent coding styles of each user of the team. The system 300 of FIG.3 uses severity scores or log level scores to make a reclassificationdecision. However, it is contemplated that sentiment values derived fromthe sentiment analysis 238 may also be used in conjunction or in tandemwith the severity scores or log level scores to make a reclassificationdecision. Moreover, the content of the log messages 320, 322, 324, 326,328 may be compared to content of log messages derived from otherapplication code written by others users/coders/developers. Thecomparison may reveal similarities and differences between content ofthe log messages of users 302, 304, 306, 308, 310. Such similarities anddifferences may be used as feedback, in combination with the sentimentvalues and the severity scores, to arrive at a reclassification decisionfor log levels of log messages 320, 322, 324, 326, 328.

FIG. 4 is a block/flow diagram of an exemplary method for reclassifyinglog messages of application code of multiple users, the log messagesincluding similar words or phrases, in accordance with an embodiment ofthe present principles.

The system 400 includes a plurality of users, e.g., a first user 402, asecond user 404, a third user 406, a fourth user 408, and a fifth user410. Each of the users 402, 404, 406, 408, 410 may be writing, e.g., aportion of an application code and including log messages therein. Forinstance, the first user 402 may write a log message 420 including theword “ . . . FAILED.” The second user 404 may write a log message 422including the word “ . . . RETRY.” The third user 406 may write a logmessage 424 including the word “ . . . PROBLEM.” The fourth user 408 maywrite a log message 426 including the words “ . . . NOT FOUND.” Thefifth user 410 may write a log message 428 including the word “ . . .ERROR.” Therefore, each of the five users 402, 404, 406, 408, 410 wrotea log message 420, 422, 424, 426, 428, respectively, that included wordor phrases that have a similar meaning or similar sentiment (e.g., anegative sentiment).

The first user 402 assigned a “WARN” log level 430 to the log message420. The second user 404 assigned an “ERROR” log level 432 to the logmessage 422. The third user 406 assigned a “FATAL” log level 434 to thelog message 424. The fourth user 408 assigned a “WARN” log level 436 tothe log message 426. The fifth user 410 assigned an “ERROR” log level438 to the log message 428.

Such information may be fed to the log level adjustment orreclassification device 176 which either changes or maintains the loglevel assignments 430, 432, 434, 436, 438 made by the users 402, 404,406, 408, 410, respectively. In this example, the log level adjustmentor reclassification device 176 maintains the log level assignment 430 ofthe first user 402, and reclassifies or adjusts or changes the second,third, fourth, and fifth log level assignments 432, 434, 436, 438 of theremaining users 404, 406, 408, 410.

For example, concerning the log level 430 of the first log message 420,the severity score 450 calculated by the NLP tool 174 came back at,e.g., 100%. Thus, the reclassification device 176 need not change thelog level of the first log message 420. Concerning the log level 432 ofthe second log message 422, the severity score 452 calculated by the NLPtool 174 came back at, e.g., 25%. Thus, the reclassification device 176automatically changed or reclassified the log level 432 to log level 462designating a “WARN” log level, which is more accurate or consistentwith other log messages. Concerning the log level 434 of the third logmessage 424, the severity score 454 calculated by the NLP tool 174 cameback at, e.g., 50%. Thus, the reclassification device 176 automaticallychanged or reclassified the log level 434 to log level 464 designating a“WARN” log level, which is more accurate or consistent, and more in linewith what was written in the first and second log messages 420, 422. The“problem” indication in log message 424 is more in line with the“failed” and “retry” indications of log messages 420, 422.

Concerning the log level 436 of the fourth log message 426, the severityscore 456 calculated by the NLP tool 174 came back at, e.g., 40%. Thus,the reclassification device 176 automatically changed or reclassifiedthe log level 436 to log level 466 designating a “TRACE” log level,which is more accurate or consistent, and more in line with other logmessages written by users 402, 404, 406, and 410. Concerning the loglevel 438 of the fifth log message 428, the severity score 458calculated by the NLP tool 174 came back at, e.g., 70%. However, thereclassification device 176 automatically changed or reclassified thelog level 438 to log level 468 designating a “WARN” log level, which ismore accurate or consistent, and more in line with other log messageswritten by users 402, 404, 406. The “cannot” indication in log message428 is more in line with the “failed,” “retry,” and “problem”indications of log messages 420, 422, 424.

Therefore, log levels across an application code written by multipleusers may be made consistent, even when taking into account thedifferent coding styles of each user of the team. Moreover, the textwithin the log messages of the application code of each user may becompared to extract similarities therefrom. If similar words aredetected, for example, “failed,” “retry,” and “problem,” then all suchlog messages may be designated with the same log level. For instance,all these words have a negative sentiment associated with them, or lowseverity score, and based on what the majority of users initiallyclassified them as, the reclassification device may take thatdata/information into account when considering reclassification of theinitial log levels.

The system 400 of FIG. 4 uses severity scores or log level scores tomake a reclassification decision. However, it is contemplated thatsentiment values derived from the sentiment analysis 238 (FIG. 2) mayalso be used in conjunction or in tandem with the severity scores or loglevel scores to make a reclassification decision. Moreover, the contentof the log messages 420, 422, 424, 426, 428 may be compared to contentof log messages derived from other application code written by othersusers/coders/developers. The comparison may reveal similarities anddifferences between content of the log messages of users 402, 404, 406,408, 410 with other users/coders/developers writing other applicationcode. Such similarities and differences may be used as feedback, incombination with the sentiment values and the severity scores, to arriveat a reclassification decision for log levels of log messages 420, 422,424, 426, 428.

For example, other coders within the organization may have alreadywritten dozens of other application codes having thousands of logmessages, each log message including a number of different textcombinations. Such text of the log messages has already been analyzedwith the NLP tools 174 discussed herein and provide for a plethora ofinformation as to what log levels the organization prefers to use forcertain types of words or phrases or text.

FIG. 5 is a block/flow diagram of an exemplary method for reclassifyinglog messages of application code of multiple users, the log messagesanalyzed by sentiment analysis, in accordance with an embodiment of thepresent principles.

The system 500 includes a plurality of users, e.g., a first user 502, asecond user 504, a third user 506, a fourth user 508, and a fifth user510. Each of the users 502, 504, 506, 508, 510 may be writing, e.g., aportion of an application code and including log messages therein. Forinstance, the first user 502 may write a log message 520 including theword “ . . . INITIALIZE.” The second user 504 may write a log message522 including the word “ . . . ERROR.” The third user 506 may write alog message 524 including the word “ . . . UNABLE.” The fourth user 508may write a log message 526 including the word “ . . . UNEXPECTED.” Thefifth user 510 may write a log message 528 including the word “ . . .FINISHED.” Therefore, each of the five users 502, 504, 506, 508, 510wrote a log message 520, 522, 524, 526, 528, respectively, that includedword or phrases that have a similar meaning or similar sentiment or nosentiment at all.

The first user 502 assigned an “INFO” log level 530 to the log message520. The second user 504 assigned an “INFO” log level 532 to the logmessage 522. The third user 506 assigned an “INFO” log level 534 to thelog message 524. The fourth user 508 assigned a “DEBUG” log level 536 tothe log message 526. The fifth user 510 assigned a “WARN” log level 538to the log message 528.

Such information may be fed to the log level adjustment orreclassification device 176 which either changes or maintains the loglevel assignments 530, 532, 534, 536, 538 made by the users 502, 504,506, 508, 510, respectively. In this example, the log level adjustmentor reclassification device 176 changes or reclassifies all the log levelassignments 530, 532, 534, 536, 538.

For example, concerning the log level 530 of the first log message 520,since there was no sentiment 550 regarding any of the words or phrasesused in the log message 520, the severity score 555 calculated by theNLP tool 174 came back at less than, e.g., 40%. Thus, thereclassification device 176 decided to automatically change the loglevel of the first log message 520 to a “TRACE” log level 560. It isnoted that a combination of a severity score and a sentiment value wereused to arrive at the conclusion that reclassification should take placefor the log message 520.

Concerning the log level 532 of the second log message 522, the NLP tool174 indicated a negative sentiment 552. Thus, the reclassificationdevice 176 automatically changed or reclassified the log level 532 tolog level 562 designating a “WARN” log level, which is more accurate orconsistent with other log messages. It seems that for this example code,negative connotations are simply designated with the “WARN” log levelby, e.g., the lead coder. Concerning the log level 534 of the third logmessage 524, the NLP tool 174 indicated a negative sentiment 554. Thus,the reclassification device 176 automatically changed or reclassifiedthe log level 534 to log level 564 designating a “WARN” log level, whichis more accurate or consistent with other log messages, and more in linewith what was written in the second log messages 522. The “UNABLE”indication in log message 524 is more in line with the “ERROR”indication of log message 522, both indicting some level of negativity(i.e., negative sentiment).

Concerning the log level 536 of the fourth log message 526, the NLP tool174 indicated a negative sentiment 556. Thus, the reclassificationdevice 176 automatically changed or reclassified the log level 536 tolog level 566 designating a “WARN” log level, which is more accurate orconsistent with other log messages, and more in line with other logmessages written by users 504, 506. Concerning the log level 538 of thefifth log message 528, the NLP tool 174 indicated a positive sentiment558. In response thereto, the reclassification device 176 automaticallychanged or reclassified the log level 538 to log level 568 designatingan “INFO” log level, which is more accurate, and more in line with otherlog messages (not shown) written by users 402, 404, 406, which may haveincluded some text or words or phrases having positive connotations. Itseems that for this example code, positive connotations are simplydesignated with the “INFO” log level by, e.g., the lead coder.

Therefore, log levels across an application code written by multipleusers may be made consistent, even when taking into account thedifferent coding styles of each user of the team. Moreover, the textwithin the log messages of the application code of each user may becompared to extract similarities therefrom. If words having similarsentiments are detected, for example, “error,” “unable,” and“unexpected,” then all such log messages may be designated with the samelog level. For instance, all these words have a negative sentimentassociated with them, or low severity score, and based on what themajority of users initially classified them as, the reclassificationdevice may take that data/information into account when consideringreclassification of the initial log levels. Of course, thereclassification may be initiated by one or more lead coders that wantto provide for more general consistency between log messages written bydifferent coders.

FIG. 6 is a sample table assigning severity scores to common words foundin log messages of application code, in accordance with an embodiment ofthe present principles.

The table 600 includes, e.g., a word column 610 and a score column 620.The word column 610 may include, e.g., the words or phrases, “ERROR”612, “CAN'T/CANNOT” 614, “UNABLE TO FIND” 616, and “FINISHED” 618. Theword “ERROR” 612 may be assigned a score of, e.g., 100% that the loglevel is “ERROR.” The words “CAN'T/CANNOT” may be assigned a score of,e.g., 50% that the log level is “WARN” and 50% that the log level is“ERROR.” The phrase “UNABLE TO FIND” 616 may be assigned a score of,e.g., 80% that that log level is “ERROR” and 20% that the log level is“WARN.” The word “FINISH” 618 may be assigned a score of, e.g., 20% thatthe log level is “TRACE,” 38% that the log level is “DEBUG,” 40% thatthe log level is “INFO,” and 2% that the log level is “WARN.” Therefore,a look-up table (LUC) may be consulted or accessed when different wordsor phrases can be assigned to multiple log levels. Each word or phrasemay be provided with a percentage of what log level may be assignedthereto.

FIG. 7 is a sample table assigning sentiments to common words found inlog messages of application code, in accordance with an embodiment ofthe present principles.

The table 700 includes, e.g., a log level column 710 and a sentimentcolumn 720. The log level column may include, e.g., the log levels“INFO” 712, “WARN” 714, and “ERROR” 716. The log level “INFO” 712 may beassigned a neutral or positive sentiment (e.g., −10% to 100%). The loglevel “WARN” 714 may be assigned a slight negative sentiment (e.g., −40%to 0%). The log level “ERROR” 716 may be assigned a slight or severenegative sentiment (e.g., −100% to −30%). Therefore, a look-up table(LUC) may be consulted or accessed when different words or phrases canbe assigned to multiple log levels. Each word or phrase may be providedwith a sentiment percentage of what log level may be assigned thereto.

It is noted that the NLP analysis tool 174 may consult or access both ofthe tables 600 and 700 of FIGS. 6 and 7 to determine severity scoresand/or sentiments in order to provide advice to the log levelreclassification device 176. Of course, the tables 600 and 700 aremerely exemplary tables. One skilled in the art may contemplate creatingtables with a plurality of different words, a plurality of differentassigned percentages, and a plurality of different log levels. Thesetables 600, 700 may be updated by a lead coder every, e.g., week, orevery, e.g., month, or every time, e.g., a new application code iswritten by the team.

FIG. 8 is an example log message found in application code having an“INFO” log level designation, the log message analyzed in accordancewith the tables of FIGS. 6 and 7, where the “INFO” designation has beenreclassified, in accordance with an embodiment of the presentprinciples.

The example log message 810 includes the log level “INFO” and some textstating “Error Writing CAS.” Performing NLP analysis 820 to the logmessage 810 reveals that the presence of the non-negated word “error”triggers a high-confidence suggestion that the log message should have alog level of “ERROR.” The words “Writing” and “CAS” do not provide anyreliable hints at to a specific log level. A scan or comparison of otherapplication codes shows that the form “Error <verb>” is 99% classifiedas “ERROR.” Additionally, the word “ERROR” has a highly negativesentiment associated with it. In conclusion, the high confidence answersresulting from the analysis 820 ultimately moves or reclassifies thislog level from “INFO” to “ERROR.”

FIG. 9 is an example log message found in application code having a“WARN” log level designation, the log message analyzed in accordancewith the tables of FIGS. 6 and 7, where the “WARN” designation has beenreclassified, in accordance with an embodiment of the presentprinciples.

The example log message 910 includes the log level “WARN” and some textstating “Mapping verification finished.” Performing NLP analysis 920 tothe log message 910 reveals that the word “finished” is rarely shown in“WARN” messages, never in “ERROR” messages, and often in either “INFO”or “DEBUG” messages. This generates a slight suggestion to lower the loglevel severity. The words “verification” and “mapping” provide no hintsat to severity or sentiment. Sentiment analysis, in this case, is allpositive. Thus, this also generates a slight suggestion to lower theseverity of the log level. Moreover, context shows that this message isnot in a catch block/if-else block, and, thus, suggesting that themessage does not warrant a “WARN” log level. Based on this analysis 920,the log level moves or is reclassified from “WARN” to “INFO.”

FIG. 10 is an example log message found in application code having a“WARN” log level designation, the log message analyzed in accordancewith the tables of FIGS. 6 and 7, where the “WARN” designation has beenmaintained, in accordance with an embodiment of the present principles.

The example log message 1010 includes the log level “WARN” and some textstating “Can't insert evidence trail: entity primary key is notavailable.” Performing NLP analysis 1020 to the log message 1010 revealsthat the presence of the words “can't” and “not available” suggest“WARN” and/or “ERROR” log levels. Other words in the text of the logmessage 1010 provide no hints as to severity score or sentiment. Thewords “can't” and “not available” suggest negative sentiment. The logmessage has a log level of “WARN” set by the user, and the NLP analysis1020 returns either a “WARN” or an “ERROR” log event as being the mostappropriate. Since the original log level is one of the suggestionsproposed by the NLP, the reclassification device 176 does not change ormodify or reclassify the log level of log message 1010.

FIG. 11 is a block/flow diagram of an exemplary method for analyzing logmessage content by using NLP analysis tools to reclassify log levelsassigned to log messages, in accordance with an embodiment of thepresent principles.

At block 1110, log messages are detected in an application code by atleast one processor.

At block 1120, a log level assigned to each of the log messages isidentified.

At block 1130, NLP analysis is performed on each of the log messages byusing at least keyword and synonym matching percentage analysiscriteria.

At block 1140, in response to the NLP analysis, a severity score isdetermined for each of the log messages.

At block 1150, based on the severity score, the assigned log level ofone or more messages is reclassified to a different log level.

In one or more embodiments, bad grammar or misspelled words in the logmessages may also be taken into account when determining a log level.

Still yet, any of the components of the present invention could becreated, integrated, hosted, maintained, deployed, managed, serviced,etc. by a service supplier who offers to provide a method for analyzinglog message content. Thus, the present invention discloses a process fordeploying, creating, integrating, hosting, maintaining, and/orintegrating computing infrastructure, including integratingcomputer-readable code into the computer system 100 (FIG. 1), whereinthe code in combination with the computer system 100 is capable ofperforming a method for providing a method for analyzing log messagecontent with respect to a product or service. In another embodiment, theinvention provides a business method that performs the processsteps/blocks of the invention on a subscription, advertising, and/or feebasis. That is, a service supplier, such as a Solution Integrator, couldoffer to provide a method for analyzing log message content with respectto a product or service. In this case, the service supplier can create,maintain, support, etc. a computer infrastructure that performs theprocess steps/blocks of the invention for one or more customers. Inreturn, the service supplier can receive payment from the customer(s)under a subscription and/or fee agreement and/or the service suppliercan receive payment from the sale of advertising content to one or morethird parties.

The descriptions of the various embodiments of the present inventionhave been presented for purposes of illustration, but are not intendedto be exhaustive or limited to the embodiments disclosed. Manymodifications and variations will be apparent to those of ordinaryskills in the art without departing from the scope and spirit of thedescribed embodiments. The terminology used herein was chosen to bestexplain the principles of the embodiments, the practical application ortechnical improvement over technologies found in the marketplace, or toenable others of ordinary skills in the art to understand theembodiments disclosed herein.

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Smalltalk, C++ or the like, andconventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the blocks may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

Reference in the specification to “one embodiment” or “an embodiment” ofthe present principles, as well as other variations thereof, means thata particular feature, structure, characteristic, and so forth describedin connection with the embodiment is included in at least one embodimentof the present principles. Thus, the appearances of the phrase “in oneembodiment” or “in an embodiment”, as well any other variations,appearing in various places throughout the specification are notnecessarily all referring to the same embodiment.

It is to be appreciated that the use of any of the following “/”,“and/or”, and “at least one of”, for example, in the cases of “A/B”, “Aand/or B” and “at least one of A and B”, is intended to encompass theselection of the first listed option (A) only, or the selection of thesecond listed option (B) only, or the selection of both options (A andB). As a further example, in the cases of “A, B, and/or C” and “at leastone of A, B, and C”, such phrasing is intended to encompass theselection of the first listed option (A) only, or the selection of thesecond listed option (B) only, or the selection of the third listedoption (C) only, or the selection of the first and the second listedoptions (A and B) only, or the selection of the first and third listedoptions (A and C) only, or the selection of the second and third listedoptions (B and C) only, or the selection of all three options (A and Band C). This may be extended, as readily apparent by one of ordinaryskill in this and related arts, for as many items listed.

Having described preferred embodiments of a system and method (which areintended to be illustrative and not limiting), it is noted thatmodifications and variations can be made by persons skilled in the artin light of the above teachings. It is therefore to be understood thatchanges may be made in the particular embodiments disclosed which arewithin the scope of the invention as outlined by the appended claims.Having thus described aspects of the invention, with the details andparticularity required by the patent laws, what is claimed and desiredprotected by Letters Patent is set forth in the appended claims.

What is claimed is:
 1. A computer-implemented method executed on amachine having at least one processor, a memory, and a communicationplatform for analyzing log message content, the method comprising:detecting log messages in an application code; identifying a log levelassigned to each of the log messages by a user, via a log levelassignment component; performing natural language processing (NLP)analysis on each of the log messages, via an NLP analysis tool, byemploying training data in combination with at least keyword and synonymmatching percentage analysis criteria; and determining, in response tothe NLP analysis, a severity score of each of the log messages via ascore classification component, the severity score used in combinationwith a sentiment value to evaluate the assigned log level to establishwhether the assigned log level requires reclassification to a differentlog level designation and modify a designation of the assigned log levelwhen a reclassification decision has been affirmed.
 2. The method ofclaim 1, further comprising comparing content of the log messages withcontent of log messages derived from other application code written byother users.
 3. The method of claim 2, wherein the compared contentreveal log similarities and differences that are fed back into the NLPanalysis tool to bolster the training data.
 4. The method of claim 1,further comprising outputting reclassified log messages to an interfaceof a computing device.
 5. The method of claim 1, further comprisingusing an integrated development environment (IDE) to reclassify theassigned log level of one or more of the log messages.
 6. The method ofclaim 1, further comprising applying a learning model to each of the logmessages detected in the application code.
 7. The method of claim 1,wherein a look-up table is employed to assign severity scores to commonwords found in the log messages.
 8. The method of claim 1, wherein alook-up table is employed to assign sentiments to common words found inthe log messages.
 9. The method of claim 1, further comprising analyzingeach of the log messages for content and context.
 10. The method ofclaim 1, wherein the keyword and synonym matching percentage analysiscriteria include positive and negative sentiment determination of eachof the log messages of the application code.
 11. A non-transitorycomputer readable storage medium comprising a computer readable programfor analyzing log message content, wherein the computer readable programwhen executed on a computer causes the computer to perform the steps of:detecting log messages in an application code; identifying a log levelassigned to each of the log messages by a user, via a log levelassignment component; performing natural language processing (NLP)analysis on each of the log messages, via an NLP analysis tool, byemploying training data in combination with at least keyword and synonymmatching percentage analysis criteria; and determining, in response tothe NLP analysis, a severity score of each of the log messages via ascore classification component, the severity score used in combinationwith a sentiment value to evaluate the assigned log level to establishwhether the assigned log level requires reclassification to a differentlog level designation and modify a designation of the assigned log levelwhen a reclassification decision has been affirmed.
 12. Thenon-transitory computer readable storage medium of claim 11, furthercomprising comparing content of the log messages with content of logmessages derived from other application code written by other users. 13.The non-transitory computer readable storage medium of claim 12, whereinthe compared content reveal log similarities and differences that arefed back into the NLP analysis tool to bolster the training data. 14.The non-transitory computer readable storage medium of claim 11, furthercomprising outputting reclassified log messages to an interface of acomputing device.
 15. The non-transitory computer readable storagemedium of claim 11, further comprising using an integrated developmentenvironment (IDE) to reclassify the assigned log level of one or more ofthe log messages.
 16. The non-transitory computer readable storagemedium of claim 11, further comprising applying a learning model to eachof the log messages detected in the application code.
 17. Thenon-transitory computer readable storage medium of claim 11, wherein alook-up table is employed to assign severity scores to common wordsfound in the log messages.
 18. The non-transitory computer readablestorage medium of claim 11, wherein a look-up table is employed toassign severity scores to common words found in the log messages. 19.The non-transitory computer readable storage medium of claim 11, furthercomprising analyzing each of the log messages for content and context.20. A computer system for analyzing log message content, the computersystem comprising: a memory; and a processor in communication with thememory, wherein the processor is configured to: detect log messages inan application code; identify a log level assigned to each of the logmessages by a user, via a log level assignment component; performnatural language processing (NLP) analysis on each of the log messages,via an NLP analysis tool, by employing training data in combination withat least keyword and synonym matching percentage analysis criteria; anddetermine, in response to the NLP analysis, a severity score of each ofthe log messages via a score classification component, the severityscore used in combination with a sentiment value to evaluate theassigned log level to establish whether the assigned log level requiresreclassification to a different log level designation and modify adesignation of the assigned log level when a reclassification decisionhas been affirmed.